package com.teatang.tadmin.sysmenu.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.teatang.tadmin.core.domain.TreeObj;
import lombok.Data;

import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SysMenuIndexVo implements TreeObj<SysMenuIndexVo> {
    private Long id;

    private Long pid;

    private String title;

    private String icon;

    private String href;

    private List<SysMenuIndexVo> child;

    @Override
    public Long parentKey() {
        return pid;
    }

    @Override
    public Long primaryKey() {
        return id;
    }

    @JsonIgnore
    @Override
    public List<SysMenuIndexVo> getTreeObjChild() {
        return child;
    }

    @Override
    public void setTreeObjChild(List<SysMenuIndexVo> list) {
        child = list;
    }
}
